﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tippelde.Entities;
using Tippelde.Services.Dtos;

namespace Tippelde.Services.Groups
{
    public interface IGroupManager
    {
        IEnumerable<GroupHeaderData> GetAllGroupHeaders();
        IEnumerable<GroupHeaderData> GetGroupHeadersForUser(string userName);
        GroupHeaderData GetGroupHeaderById(int groupId);
        Group CreateGroup(string creatorName, string name, string shortName, string description);
        Group EditGroup(GroupHeaderData group);
        List<int> GetGroupIdsForUser(string userName);
        List<string> GetUserIdsForGroup(int groupId);
        List<string> GetEditorUserIdsForGroup(int groupId); 
        Task AssignUserToGroupsAsync(string userId, Dictionary<int, bool> groupIdsAssigned);
        Task AssignToGroupAsync(int groupId, Dictionary<string, bool[]> userIdsAssigned);
        List<int> GetActiveGroupIdsForEvent(int eventId);
        List<int> GetActiveGroupIdsForNews(int newsId);

        void DeleteGroup(int Id);

        bool HasAnyEditorRights(string userName);
        bool HasAnyEditorRightsForGroup(string userName, int groupId);
        bool HasAnyEditorRightsForEvent(string username, int eventId);
        bool HasAnyEditorRightsForNews(string username, int groupId);
        List<int> GetGroupIdsForEditor(string userName);

    }
}

